﻿<!-- #include file="mymin.asp" -->
<title>删除会员账户</title></head><body><div class='main400'>
<%

dim id,rs
id=getN("id",1)
If getData("a")<>"1" Then
	set rs=Server.CreateObject("ADODB.Recordset")
	rs.open"select name from 74hu_user where ID="&id,myconn,1,1
	If Not rs.eof	Then
		w "你确定删除用户: "&nowml(rs("name"))&" , 删除包含该会员所有的帖子和回复,好友,信箱,留言<br/>"&_
			"提示:修改用户密码可以迫使该用户无法登录<br/>"&_
			"<a href=""delmember.asp?sid="&sid&"&amp;id="&id&"&amp;a=1"">确认删除</a><br/>"&_
			"<a href=""detail.asp?sid="&sid&"&amp;id="&id&""">返回管理</a><br/>"
	Else
		w "没有这个会员！<br/>"
	End If
	rs.close
	set rs=nothing
Else

	If id=1 Then
		w "ID为1的账户不能删除,否则会引起论坛异常!<br/><a href=""detail.asp?sid="&sid&"&amp;id="&id&""">返回管理</a><br/>"
	Else
		Server.ScriptTimeOut=999999
		myconn.execute("delete from 74hu_user where id="&id)'删除会员
		myconn.execute("delete from 74hu_topic where userid="&id)'删除帖子
		myconn.execute("delete from 74hu_reply where userid="&id)'删除回复
		myconn.execute("delete from 74hu_friend where uid="&id)'删除好友
		myconn.execute("delete from 74hu_message where userid="&id&" or receive="&id)'删除信箱
		myconn.execute("delete from 74hu_guest where agent='"&id&"'")'删除留言
		myconn.execute("update 74hu_class set relid=0 where lx=3 and relid="&id)'去掉版主权限
		w "删除成功!<br/>"
	End If

End If
w "----------<br/><a href=""member.asp?sid="&sid&"&amp;"">[会员总管]</a>"

call bbsLast
%>